<?php


require_once './vendor/autoload.php';
require_once './alipay.php';

$aop = new \LiuQiang\AliPayAopTransfer\AopCertClient(conf());
//$request = new \LiuQiang\AliPayAopTransfer\request\AlipayFundTransUniTransferRequest();
//$params = [
//    'out_biz_no' => uniqid(rand()),
//    'trans_amount' => 0.1,
//    "product_code" => "TRANS_ACCOUNT_NO_PWD", //支付宝
//    "biz_scene" => "DIRECT_TRANSFER",
//    "order_title" => "test",
//    "payee_info" => [
//        "identity_type" => "ALIPAY_LOGON_ID",
//        "identity" => "18282669832",
//        "name" => "刘强",
//    ],
//];
//$request->setBizContent(json_encode($params));
//$result = $aop->execute($request);
//if (empty($result)) throw new Exception("支付返回异常!");
//$response = $result->alipay_fund_trans_uni_transfer_response;
//if ($response->code == '10000') { //成功
//    $payStatus = '已打款';
//    $status = MoneyPayLog::STATUS_SUCCESS;
//    $desc = $response->msg;
//    $payTime = time();
//} else { //失败
//    $payStatus = '打款失败';
//    $status = MoneyPayLog::STATUS_FAILURE;
//    $desc = $response->sub_msg;
//    $payTime = 0;
//}




$request = new \LiuQiang\AliPayAopTransfer\request\AlipayFundTransOrderQueryRequest();
$params = [
    'order_id' => '20200820110070001506130067883782'
];
$request->setBizContent(json_encode($params));
$result = $aop->execute($request);

var_dump($result);exit();